In the last video we examined the portfolio diversification effect and we learned that each stock contains
and systematic risk that can be diversified when putting the stock into a portfolio and systematic risk
that cannot be diversified.
And in this video we will split the total risk of our constituents stocks into a systematic and and
systematic risk and I must admit that we oversimplify things and the last video when we calculated the
weighted average risk as we did this with the standard deviation of returns.
However simple arithmetic operations like addition and multiplication with the standard deviation mathematically
wrong and we have seen this when we convert a daily risk to annualized risk by multiplying the standard
deviation of daily returns with the square root of 250 to s the standard deviation is the square root
of the variance and when we have the risk and variance units it is the mathematically correct to perform
arithmetic.
And that's exactly the reason why in this video we will use the variance instead of the standard deviation.
However the error we made in the last video was fairly low so we actually didn't change the big picture
and the key findings.
So let's move on here and we still have important.
The summary data frame with the annualized the risk and return and the shop ratio.
And as I said here we have the risk in standard deviation units.
And so the standard deviation is simply the square root of the variance and we can convert the standard
deviation to the variance by taking the standard deviation to the power of two.
And this is exactly what we are doing here.
So we're using the NUM pi function and people power we perceive the risk column and we are square actually
the risk column and we created the new column total risk in the variance units
so here we are on the right hand side.
The variance of the standard deviation here and that's still the total risk of our constituents and
we also still impart that the returns data frame.
So these are the daily returns of the constituents and the M P portfolio and having the returns data
frame we can create.
The covariance matrix so we can do this with the method Cove.
And by doing so we would get the daily code variances and also the same as the width of the variance
and the standard deviation and also of the returns.
You can annualize them the covariance matrix by multiplying with 252.
So we have two hundred and fifty two trading days on average so let's have a look here.
So here we have the new data frame Cove which is actually the covariance matrix with the annualized
covariance us.
And as a short recap of the covariance of the Amazon stock with the Amazon stock itself is a nine point
six percent.
And this is simply the variance so we can also verify this.
And here we have the variance of the Amazon stock of nine point six percent and the same we have here
and we also have still imparted the optimal way it's so these are the weights of uh the constituents
and our MP portfolio.
And we can actually see here on the right hand side the column MP portfolio.
And here we have the CO variances of the MP portfolio with its constituents and actually we could simply
calculate the weighted average covariance of the constituents.
And we can do this by selecting the column here and then we are using the top method and we pass the
optimal weights.
So let's do this and we get the weighted average covariance off the constituents of MP with MP and this
is three point nine percent.
And uh this looks pretty familiar.
So the total risk or the variance of the MP portfolio is also three point nine percent.
So we can also explicitly select the variance of the MP portfolio here.
So this is what we are doing and uh.
So here we have two times exactly the same result and as a summary we could say that the total risk
of the portfolio consists of the evaded average covariance us of the constituents of the portfolio and
therefore the covariance of the constituents of the portfolio are actually the systematic risk of the
constituents and therefore we can include to our summary data frame the columns systematic risk.
And we simply copy here the CO variances.
So this column here into our summary data frame
so here we f on the right hand side the columns systematic risk and variance terms and actually these
values are their core variances of the constituents with the market portfolio.
So we have here the total risk then we have here the systematic risk and actually the difference between
the total risk and the systematic risk is the and systematic risk that can be diversified and therefore
we can create also the column and systematic risk where we have abstract.
The systematic risk from the total risk and let's do this
so here we have for all stocks and also for the market portfolio.
The total risk the systematic risk and and systematic risk.
So let's have a look here for example at the Amazon stock the total risk and variance unit is nine point
six percent and actually almost 50 percent of the total risk is and systematic risk.
That can be diversified and that's also if you look at the market portfolio.
So the total risk is uh about 4 percent and uh the systematic risk is also 4 percent and that's actually
0 and systematic risk costs.
This is already the market portfolio where we diversify it away the and systematic risk of the constituents
and the market portfolio by definition only consists of systematic risk or market risk.
And we can also visualise this for our constituents and the market portfolio.
So we're creating here a buyer plot and we actually selected the Amazon stock.
The Boeing stock and the Microsoft stock in our portfolio and we we're actually visualizing in a stacked
bar plot.
The systematic risk and the and systematic risk.
So the last uh two columns here and let's have a look
so here we have on the x axis our stocks and the portfolio and on the y axis the risk and variance units
and in blue we can see here the systematic risk and in green the UN's systematic risk and actually the
systematic risk of our market portfolio here is simply the weighted average of the systematic risk of
the three constituents and by forming a portfolio we get rid of the and systematic risks offer the constituents
so the green parts here completely diminish in our portfolio.
So there's no Green Party here.
And at this point I have to make one important note.
So this particular split into a systematic and unsourced somatic risk is well it only for our specific
case.
So our portfolio consists of only those three stocks and a three stock portfolio is actually not a very
perfectly diversified portfolio and in a sense um the market portfolio here still contains and systematic
risk of each constituents as the weight of each constituent is still high.
And if we had a portfolio with 100 stocks then the answers the medic risk portion of our three stocks
here would even be higher.
So this split only applies here for this specific case.
All right now let's move on and.
Throughout the costs we implicitly agreed on the fact that there is a relationship between risk and
return.
So the higher the risk of a stock the higher should be the return.
And the question is which relationship do we have here.
And of course we would always prefer a linear relationship so that would be great.
And uh we can try to visualize this or try to get a linear relationship by plotting the risk on the
x axis and the return on the y axis.
So this is actually nothing new.
And the first try we use of the total risk and variance unit.
So we have on the x axis the total risk and on the y axis the return.
And we do this for our six stocks and for our market portfolio here.
So let's have a look.
So here we have also the risk free asset then our constituents and the market portfolio.
And on the x axis as I said we feel the total risk and the return here on the y axis and by drawing
a line here from the risk free asset to the market portfolio then we can see here that there is no linear
relationship between total risk and return and therefore instead of using the total risk we should also
try to use the systematic risk.
So maybe there's a significant linear relationship between the systematic risk and the return and uh
therefore we created again a set up plot and uh we choose from our summary data frame the columns the
systematic risk and variance units and the returns column and that's simply running the set and let's
have a look
so here we plotted systematic risk of our stocks versus the return.
And we can see that.
When we are creating a line from the risk free asset to the market portfolio which is here.
So this is the Microsoft stock and this is the market portfolio.
So when we draw here a line from the risk free asset to the market portfolio then our constituent stocks.
So the Boeing stock the Microsoft stock and also the Amazon stock they are on this line here.
So the market portfolio consists of uh these three stocks and of course the market portfolio was designed
in a way that it's actually the optimal portfolio when taking here the six constituents and we can also
see here that the stocks Coca-Cola Disney and IBM are not on our line here.
And the reason for this is that they did not deliver the return that they should deliver based on the
systematic risk that they had with the market portfolio.
So they actually underperformed in terms of systematic risk and return and therefore they have zero
weight in our optimal portfolio and with this we are finished with this video and I hope to see you
also in the next one by.